//
//  MeViewController.m
//  01-UIViewHomeWork
//
//  Created by dllo on 16/7/22.
//  Copyright © 2016年 QC.L. All rights reserved.
//
// http://www.jianshu.com/writer#/notebooks/4449859/notes/4921977
#import "MeViewController.h"
#import "ViewController.h"

@interface MeViewController ()

@end

@implementation MeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = YES;
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width , self.view.frame.size.height / 3)];
    view.backgroundColor = [UIColor colorWithRed:0.00 green:0.70 blue:0.54 alpha:1.00];
    [self.view addSubview:view];
    UIImageView *image = [[UIImageView alloc] initWithFrame:CGRectMake(150, 65, 100, 100)];
    image.layer.cornerRadius = 50;
    [image setImage:[UIImage imageNamed:@"AADAEA5A-FFDD-494A-A2F6-D6A05BE943A3"]];
    image.backgroundColor = [UIColor whiteColor];
    [view addSubview:image];
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.frame = CGRectMake(150, 180, 100, 40);
    [btn setTitle:@"登陆/注册" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)clickBtn:(UIButton *)sender {
    ViewController *VC = [[ViewController alloc] init];
    [self.navigationController pushViewController:VC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
